﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FreeDream.Common
{
    public class ResultParam
    {
        public static ResultParam SucessResult()
        {
            return new ResultParam { code = 0, message = "成功" };
        }
        public ResultParam() { }
        public ResultParam(int code, string msg, object data = null, string text = "")
        {
            this.code = code;
            this.message = msg;
            this.data = data;
            this.Text = text;
        }

        public bool Result { get { return code == 0; } }
        public int code { set; get; }
        public string message { set; get; }
        public object data { set; get; }
        public string Text { set; get; }
    }
}
